<!DOCTYPE html>

<html lang="zh-cn">

<head>
    <meta charset="utf-8">
    <title>AsyncTest</title>
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
</head>

<body>
    <script>
        async function fun1() {
            return new Promise(resolve => {
                setTimeout(() => {
                    resolve('resolve');
                }, 1000);
            });
        }

        fun1().then(obj => {
            console.log(obj);
        });
    </script>
</body>

</html>